package siyuan.run.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @program: sy
 * @description: 自定义负载均衡启动类
 * @author: Jacob
 * @create: 2020-11-24 19:58
 **/
@SpringBootApplication
public class GatewayConfigurationApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayConfigurationApplication.class,args);
    }

    /**
     * 代码方式实现转发
     */
/*    @Bean
    public RouteLocator routeLocator (RouteLocatorBuilder builder) {
        return builder.routes()
                .route("hello2", r -> r.path("/hello2/**")
                        .uri("https://www.siyuan.run"))
                //注意这里是转发到http://www.longzhonghua.com/hello2/**
                .build();
    }*/
}
